﻿<igRibbon:XamRibbonWindow x:Class="OneStop.UI.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:igWindows="http://infragistics.com/Windows"
    xmlns:igDP="http://infragistics.com/DataPresenter"
    xmlns:igRibbon="http://infragistics.com/Ribbon"
    xmlns:igThemes="http://infragistics.com/Themes"
    xmlns:igCA="http://infragistics.com/Chart"
    xmlns:igEditors="http://infragistics.com/Editors"
    xmlns:local="clr-namespace:OneStop.UI" 
    xmlns:sys="clr-namespace:System;assembly=mscorlib"
    WindowStartupLocation="CenterScreen"
    Loaded="XamRibbonWindow_Loaded"
    Unloaded="XamRibbonWindow_Unloaded"
    Icon="Images\Ribbon16\sign_stop.png"
    ResizeMode="CanResizeWithGrip"
    Title="OneStop" Height="768" Width="1024">
    <igRibbon:RibbonWindowContentHost>
        <igRibbon:RibbonWindowContentHost.Ribbon>

            <igRibbon:XamRibbon Name="Ribbon" VerticalAlignment="Top" Theme="Office2k7Black" Height="141">
                <igRibbon:XamRibbon.ApplicationMenu>
                    
                    <igRibbon:ApplicationMenu >
                        <igRibbon:ApplicationMenu.Items>
                            <igRibbon:ButtonTool Caption="New" Id="abtNew" LargeImage="Images\Ribbon32\new.png" Click="btnNew_Click" />
                            <igRibbon:ButtonTool Caption="Open" Id="abtOpen" LargeImage="Images\Ribbon32\open.png" Click="btnOpen_Click" />
                            <igRibbon:ButtonTool Caption="Save" Id="abtSave" LargeImage="Images\Ribbon32\save.png" Click="btnSave_Click" />
                            <igRibbon:ButtonTool Caption="Save As" Id="abtSaveAs" LargeImage="Images\Ribbon32\saveas.png" Click="abtSaveAs_Click" />
                        </igRibbon:ApplicationMenu.Items>
                                                
                        <igRibbon:ApplicationMenu.FooterToolbar>
                            <igRibbon:ApplicationMenuFooterToolbar>
                                <igRibbon:ButtonTool Caption="Exit" Id="btnExit" Click="btnExit_Click" SmallImage="Images\Ribbon16\exit.png" />
                            </igRibbon:ApplicationMenuFooterToolbar>
                        </igRibbon:ApplicationMenu.FooterToolbar>

                    </igRibbon:ApplicationMenu>
                </igRibbon:XamRibbon.ApplicationMenu>


                <igRibbon:XamRibbon.Resources>
                    <Style x:Key="GfTextBox" TargetType="{x:Type igRibbon:TextEditorTool}">
                        <Setter Property="EditAreaWidth" Value="23" />
                        <Setter Property="Padding" Value="0,0,4,0" />
                        <Setter Property="Width" Value="40" />
                        <Setter Property="ValueType" Value="{x:Type sys:Int32}" />
                        <Setter Property="igRibbon:RibbonGroup.MinimumSize" Value="ImageAndTextNormal" />
                        <Setter Property="igRibbon:RibbonGroup.MaximumSize" Value="ImageAndTextNormal" />
                        <Setter Property="IsAlwaysInEditMode" Value="true" />
                        <Setter Property="InvalidValueBehavior" Value="RevertValue" />
                        <Setter Property="ToolTip" Value="Gf must be an integer in range 1-100" />
                        <Setter Property="ValueConstraint">
                            <Setter.Value>
                                <igEditors:ValueConstraint MinInclusive="1" MaxInclusive="100" Nullable="False" ValidateAsType="Integer32" />
                            </Setter.Value>
                        </Setter>
                    </Style>
                    <Style x:Key="DepthTextBox" TargetType="{x:Type igRibbon:TextEditorTool}">
                        <Setter Property="EditAreaWidth" Value="23" />
                        <Setter Property="Padding" Value="0,0,4,0" />
                        <Setter Property="Width" Value="23" />
                        <Setter Property="ValueType" Value="{x:Type sys:Int32}" />
                        <Setter Property="igRibbon:RibbonGroup.MinimumSize" Value="ImageAndTextNormal" />
                        <Setter Property="igRibbon:RibbonGroup.MaximumSize" Value="ImageAndTextNormal" />
                        <Setter Property="IsAlwaysInEditMode" Value="true" />
                        <Setter Property="InvalidValueBehavior" Value="RevertValue" />
                        <Setter Property="ToolTip" Value="Depth must be an integer" />
                        <Setter Property="ValueConstraint">
                            <Setter.Value>
                                <igEditors:ValueConstraint MinInclusive="1" Nullable="False" ValidateAsType="Integer32" />
                            </Setter.Value>
                        </Setter>
                    </Style>
                    <Style x:Key="TimeTextBox" TargetType="{x:Type igRibbon:TextEditorTool}">
                        <Setter Property="EditAreaWidth" Value="23" />
                        <Setter Property="Padding" Value="0,0,4,0" />
                        <Setter Property="Width" Value="23" />
                        <Setter Property="ValueType" Value="{x:Type sys:Int32}" />
                        <Setter Property="igRibbon:RibbonGroup.MinimumSize" Value="ImageAndTextNormal" />
                        <Setter Property="igRibbon:RibbonGroup.MaximumSize" Value="ImageAndTextNormal" />
                        <Setter Property="IsAlwaysInEditMode" Value="true" />
                        <Setter Property="InvalidValueBehavior" Value="RevertValue" />
                        <Setter Property="ToolTip" Value="Time must be an integer" />
                        <Setter Property="ValueConstraint">
                            <Setter.Value>
                                <igEditors:ValueConstraint MinInclusive="1" Nullable="False" ValidateAsType="Integer32" />
                            </Setter.Value>
                        </Setter>
                    </Style>
                    <Style x:Key="RMVTextBox" TargetType="{x:Type igRibbon:TextEditorTool}">
                        <Setter Property="EditAreaWidth" Value="23" />
                        <Setter Property="Padding" Value="0,0,4,0" />
                        <Setter Property="Width" Value="23" />
                        <Setter Property="ValueType" Value="{x:Type sys:Int32}" />
                        <Setter Property="igRibbon:RibbonGroup.MinimumSize" Value="ImageAndTextNormal" />
                        <Setter Property="igRibbon:RibbonGroup.MaximumSize" Value="ImageAndTextNormal" />
                        <Setter Property="IsAlwaysInEditMode" Value="true" />
                        <Setter Property="InvalidValueBehavior" Value="RevertValue" />
                        <Setter Property="ToolTip" Value="RMV must be an integer" />
                        <Setter Property="ValueConstraint">
                            <Setter.Value>
                                <igEditors:ValueConstraint MinInclusive="1" Nullable="False" ValidateAsType="Integer32" />
                            </Setter.Value>
                        </Setter>
                    </Style>
                    <Style x:Key="RateTextBox" TargetType="{x:Type igRibbon:TextEditorTool}">
                        <Setter Property="EditAreaWidth" Value="23" />
                        <Setter Property="Padding" Value="0,0,4,0" />
                        <Setter Property="Width" Value="40" />
                        <Setter Property="ValueType" Value="{x:Type sys:Int32}" />
                        <Setter Property="igRibbon:RibbonGroup.MinimumSize" Value="ImageAndTextNormal" />
                        <Setter Property="igRibbon:RibbonGroup.MaximumSize" Value="ImageAndTextNormal" />
                        <Setter Property="IsAlwaysInEditMode" Value="true" />
                        <Setter Property="InvalidValueBehavior" Value="RevertValue" />
                        <Setter Property="ToolTip" Value="Descent/Ascent rate must be an integer" />
                        <Setter Property="ValueConstraint">
                            <Setter.Value>
                                <igEditors:ValueConstraint MinInclusive="1" Nullable="False" ValidateAsType="Integer32" />
                            </Setter.Value>
                        </Setter>
                    </Style>
                    <Style x:Key="AltitudeTextBox" TargetType="{x:Type igRibbon:TextEditorTool}">
                        <Setter Property="EditAreaWidth" Value="35" />
                        <Setter Property="Padding" Value="0,0,4,0" />
                        <Setter Property="Width" Value="35" />
                        <Setter Property="ValueType" Value="{x:Type sys:Int32}" />
                        <Setter Property="igRibbon:RibbonGroup.MinimumSize" Value="ImageAndTextNormal" />
                        <Setter Property="igRibbon:RibbonGroup.MaximumSize" Value="ImageAndTextNormal" />
                        <Setter Property="IsAlwaysInEditMode" Value="true" />
                        <Setter Property="InvalidValueBehavior" Value="RevertValue" />
                        <Setter Property="ToolTip" Value="Altitude (in millibar) must be an integer" />
                        <Setter Property="ValueConstraint">
                            <Setter.Value>
                                <igEditors:ValueConstraint MinInclusive="1" Nullable="False" ValidateAsType="Integer32" />
                            </Setter.Value>
                        </Setter>
                    </Style>
                    <Style x:Key="PPO2TextBox" TargetType="{x:Type igRibbon:TextEditorTool}">
                        <Setter Property="EditAreaWidth" Value="35" />
                        <Setter Property="Padding" Value="0,0,4,0" />
                        <Setter Property="Width" Value="35" />
                        <Setter Property="ValueType" Value="{x:Type sys:Double}" />
                        <Setter Property="igRibbon:RibbonGroup.MinimumSize" Value="ImageAndTextNormal" />
                        <Setter Property="igRibbon:RibbonGroup.MaximumSize" Value="ImageAndTextNormal" />
                        <Setter Property="IsAlwaysInEditMode" Value="true" />
                        <Setter Property="InvalidValueBehavior" Value="RevertValue" />
                        <Setter Property="ToolTip" Value="PPO2 must be an numeric" />
                        <Setter Property="ValueConstraint">
                            <Setter.Value>
                                <igEditors:ValueConstraint MinInclusive="1" Nullable="False" ValidateAsType="Double" />
                            </Setter.Value>
                        </Setter>
                    </Style>
                    <Style x:Key="WarningTextBox" TargetType="{x:Type igRibbon:TextEditorTool}">
                        <Setter Property="EditAreaWidth" Value="30" />
                        <Setter Property="Padding" Value="0,0,4,0" />
                        <Setter Property="Width" Value="50" />
                        <Setter Property="ValueType" Value="{x:Type sys:Double}" />
                        <Setter Property="igRibbon:RibbonGroup.MinimumSize" Value="ImageAndTextNormal" />
                        <Setter Property="igRibbon:RibbonGroup.MaximumSize" Value="ImageAndTextNormal" />
       
                        <Setter Property="InvalidValueBehavior" Value="RevertValue" />
                        <Setter Property="ToolTip" Value="Warning PPO2 must be a numeric value" />
                        <Setter Property="ValueConstraint">
                            <Setter.Value>
                                <igEditors:ValueConstraint MinInclusive="0.16" Nullable="False" ValidateAsType="Double" />
                            </Setter.Value>
                        </Setter>
                    </Style>
                    <Style x:Key="PPN2SpikeTextBox" TargetType="{x:Type igRibbon:TextEditorTool}">
                        <Setter Property="EditAreaWidth" Value="23" />
                        <Setter Property="Padding" Value="0,0,4,0" />
                        <Setter Property="Width" Value="43" />
                        <Setter Property="ValueType" Value="{x:Type sys:Double}" />
                        <Setter Property="igRibbon:RibbonGroup.MinimumSize" Value="ImageAndTextNormal" />
                        <Setter Property="igRibbon:RibbonGroup.MaximumSize" Value="ImageAndTextNormal" />
                  
                        <Setter Property="InvalidValueBehavior" Value="RevertValue" />
                        <Setter Property="ToolTip" Value="Warning must be an integer in range 1-100" />
                        <Setter Property="ValueConstraint">
                            <Setter.Value>
                                <igEditors:ValueConstraint MinInclusive="1" Nullable="False" ValidateAsType="Double" />
                            </Setter.Value>
                        </Setter>
                    </Style>
                </igRibbon:XamRibbon.Resources>

                <igRibbon:XamRibbon.Tabs>
                    <igRibbon:RibbonTabItem Header="Home">
                        <igRibbon:RibbonGroup Caption="Profile Actions" Height="75">
                            <igRibbon:ButtonTool    Id="btnNew" 
                                                Caption="New"
                                                SmallImage="Images/Ribbon16/new.png" 
                                                LargeImage="Images/Ribbon32/new.png"                            
                                                igRibbon:RibbonGroup.MinimumSize="ImageAndTextLarge"
                                                igRibbon:RibbonGroup.MaximumSize="ImageAndTextLarge" Click="btnNew_Click" />
                            <igRibbon:ButtonTool    Id="btnSave" 
                                                Caption="Save"
                                                SmallImage="Images/Ribbon16/save.png" 
                                                LargeImage="Images/Ribbon32/save.png"                            
                                                igRibbon:RibbonGroup.MinimumSize="ImageAndTextLarge"
                                                igRibbon:RibbonGroup.MaximumSize="ImageAndTextLarge" Click="btnSave_Click" />
                            <igRibbon:ButtonTool    Id="btnOpen" 
                                                Caption="Open"
                                                SmallImage="Images/Ribbon16/open.png" 
                                                LargeImage="Images/Ribbon32/open.png"                            
                                                igRibbon:RibbonGroup.MinimumSize="ImageAndTextLarge"
                                                igRibbon:RibbonGroup.MaximumSize="ImageAndTextLarge" Click="btnOpen_Click" />
                            <igRibbon:ButtonTool    Id="btnCalc" 
                                                Caption="Calculate"
                                                SmallImage="Images/Ribbon16/calculate.png" 
                                                LargeImage="Images/Ribbon32/calculate.png"                            
                                                igRibbon:RibbonGroup.MinimumSize="ImageAndTextLarge"
                                                igRibbon:RibbonGroup.MaximumSize="ImageAndTextLarge" Click="btnCalc_Click" />
                            <igRibbon:ButtonTool    Id="btnReset" 
                                                Caption="Reset"
                                                SmallImage="Images/Ribbon16/reset.png" 
                                                LargeImage="Images/Ribbon32/reset.png"                            
                                                igRibbon:RibbonGroup.MinimumSize="ImageAndTextLarge"
                                                igRibbon:RibbonGroup.MaximumSize="ImageAndTextLarge" Click="btnReset_Click" />
                        </igRibbon:RibbonGroup>

                        <igRibbon:RibbonGroup Id="ViewGroup" Caption="View" Height="75">
                            <igRibbon:RadioButtonTool    Id="btnViewDive" 
                                                     IsChecked="true"
                                                     GroupName="View"
                                                Caption="Dive"
                                                LargeImage="Images/Ribbon32/view_dive.png"                            
                                                igRibbon:RibbonGroup.MinimumSize="ImageAndTextLarge"
                                                igRibbon:RibbonGroup.MaximumSize="ImageAndTextLarge"/>
                            <igRibbon:RadioButtonTool    Id="btnViewBail" 
                                                     GroupName="View"
                                                Caption="Bailout"
                                                LargeImage="Images/Ribbon32/view_bail.png"                            
                                                igRibbon:RibbonGroup.MinimumSize="ImageAndTextLarge"
                                                igRibbon:RibbonGroup.MaximumSize="ImageAndTextLarge" 
                                                Checked="btnViewBail_Checked"
                                                Unchecked="btnViewBail_Unchecked" />

                        </igRibbon:RibbonGroup>

                        <igRibbon:RibbonGroup Caption="Print &amp; Export" Height="75">
                            <igRibbon:ButtonTool    Id="btnPrint" 
                                                Caption="Tables"
                                                LargeImage="Images/Ribbon32/print.png"                            
                                                igRibbon:RibbonGroup.MinimumSize="ImageAndTextLarge"
                                                igRibbon:RibbonGroup.MaximumSize="ImageAndTextLarge" Click="btnPrint_Click" />
                            <igRibbon:ButtonTool    Id="btnExcel" 
                                                Caption="Excel" Click="btnExcel_Click"
                                                LargeImage="Images/Ribbon32/export1.png"                            
                                                igRibbon:RibbonGroup.MinimumSize="ImageAndTextLarge"
                                                igRibbon:RibbonGroup.MaximumSize="ImageAndTextLarge"/>
                        </igRibbon:RibbonGroup>

                        <igRibbon:RibbonGroup Caption="Chart" Height="75">
                            <igRibbon:ButtonTool    Id="btnViewChart" 
                                                Caption="Enlarge"
                                                LargeImage="Images/Ribbon32/chart_enlarge.png"                            
                                                igRibbon:RibbonGroup.MinimumSize="ImageAndTextLarge"
                                                igRibbon:RibbonGroup.MaximumSize="ImageAndTextLarge" Click="btnViewChart_Click" />

                        </igRibbon:RibbonGroup>

                    </igRibbon:RibbonTabItem>

                    <igRibbon:RibbonTabItem Header="Settings">

                        <igRibbon:RibbonGroup Caption="Gradient Factors" Height="75">
                            <igRibbon:ButtonGroup HorizontalAlignment="Center" VerticalAlignment="Center">
                                <igRibbon:LabelTool Caption="Normal:" Width="50" />
                                <igRibbon:TextEditorTool  x:Name="txtGFLow" 
                                                            SmallImage="Images/Ribbon16/gf_low.png"               
                                                            TextChanged="txtGFLow_ValueChanged"
                                                            HorizontalContentAlignment="Right"
                                                            Style="{StaticResource GfTextBox}" />
                                <igRibbon:TextEditorTool  x:Name="txtGFHigh" 
                                                            SmallImage="Images/Ribbon16/gf_high.png"              
                                                            TextChanged="txtGFHigh_ValueChanged"
                                                            HorizontalContentAlignment="Right"
                                                            Style="{StaticResource GfTextBox}" />
                            </igRibbon:ButtonGroup>
                            <igRibbon:ButtonGroup HorizontalAlignment="Center" VerticalAlignment="Center">
                                <igRibbon:LabelTool Caption="Bailout:" Width="50" />
                                <igRibbon:TextEditorTool  x:Name="txtGFLowBail" 
                                                            SmallImage="Images/Ribbon16/gf_low.png"                 
                                                            TextChanged="txtGFLowBail_ValueChanged" 
                                                            HorizontalContentAlignment="Right"
                                                            Style="{StaticResource GfTextBox}" />
                                <igRibbon:TextEditorTool  x:Name="txtGFHighBail" 
                                                            SmallImage="Images/Ribbon16/gf_high.png"                 
                                                            TextChanged="txtGFHighBail_ValueChanged"  
                                                            HorizontalContentAlignment="Right"
                                                            Style="{StaticResource GfTextBox}" />
                            </igRibbon:ButtonGroup>

                        </igRibbon:RibbonGroup>
                        <igRibbon:RibbonGroup Caption="Deco Stops" Height="75">

                            <igRibbon:ButtonGroup HorizontalAlignment="Center" VerticalAlignment="Center">
                                <igRibbon:LabelTool Caption="Increment:" Width="60" />
                                <igRibbon:TextEditorTool  x:Name="txtStopIncrement" 
                                                            TextChanged="txtStopIncrement_ValueChanged"
                                                            HorizontalContentAlignment="Right"
                                                            Style="{StaticResource DepthTextBox}" />
                            </igRibbon:ButtonGroup>

                            <igRibbon:ButtonGroup HorizontalAlignment="Center" VerticalAlignment="Center">
                                <igRibbon:LabelTool Caption="Last Stop:" Width="60" />
                                <igRibbon:TextEditorTool  x:Name="txtStopLast" 
                                                            TextChanged="txtStopLast_ValueChanged"
                                                            HorizontalContentAlignment="Right"
                                                            Style="{StaticResource DepthTextBox}" />
                            </igRibbon:ButtonGroup>
                            <igRibbon:SeparatorTool />
                            <igRibbon:ButtonGroup HorizontalAlignment="Center" VerticalAlignment="Center">
                                <igRibbon:LabelTool Caption="Time:" Width="35" />
                                <igRibbon:TextEditorTool  x:Name="txtStopTime"
                                                            TextChanged="txtStopTime_ValueChanged"
                                                            HorizontalContentAlignment="Right"
                                                            Style="{StaticResource TimeTextBox}" />
                            </igRibbon:ButtonGroup>

                        </igRibbon:RibbonGroup>

                        <igRibbon:RibbonGroup Caption="Gas RMV" Height="75">
                            <igRibbon:ButtonGroup HorizontalAlignment="Center" VerticalAlignment="Center">
                                <igRibbon:LabelTool Caption="Dive:" Width="35" />
                                <igRibbon:TextEditorTool  x:Name="txtRMVDive"                                                             
                                                            TextChanged="txtRMVDive_ValueChanged"
                                                            HorizontalContentAlignment="Right"
                                                            Style="{StaticResource RMVTextBox}" />
                            </igRibbon:ButtonGroup>

                            <igRibbon:ButtonGroup HorizontalAlignment="Center" VerticalAlignment="Center">
                                <igRibbon:LabelTool Caption="Deco:" Width="35" />
                                <igRibbon:TextEditorTool  x:Name="txtRMVDeco" 
                                                            TextChanged="txtRMVDeco_ValueChanged"
                                                            HorizontalContentAlignment="Right"
                                                            Style="{StaticResource RMVTextBox}" />
                            </igRibbon:ButtonGroup>
                        </igRibbon:RibbonGroup>
                        <igRibbon:RibbonGroup Caption="Options" Height="75">
                            <igRibbon:CheckBoxTool x:Name="chkRuntimeFlag" Caption="Time is Runtime" 
                                               Checked="chkRuntimeFlag_Checked" Unchecked="chkRuntimeFlag_Unchecked" />
                            <igRibbon:ButtonGroup HorizontalAlignment="Center" VerticalAlignment="Center">
                                <igRibbon:RadioButtonTool x:Name="rdoMetric" GroupName="Units" Caption="Metric" IsEnabled="true" IsChecked="True" />
                                <igRibbon:RadioButtonTool x:Name="rdoImperial" GroupName="Units" Caption="Imperial" IsEnabled="true"
                                                          Checked="rdoImperil_Checked"
                                                          Unchecked="rdoImperil_Unchecked"/>
                            </igRibbon:ButtonGroup>
                            <igRibbon:SeparatorTool />
                            <igRibbon:ButtonGroup HorizontalAlignment="Center" VerticalAlignment="Center">
                                <igRibbon:LabelTool Caption="Descent:" Width="50" />
                                <igRibbon:TextEditorTool  x:Name="txtDescent"
                                                            SmallImage="Images/Ribbon16/descend.png"    
                                                            TextChanged="txtDescent_ValueChanged"
                                                            HorizontalContentAlignment="Right"
                                                            Style="{StaticResource RateTextBox}" />
                            </igRibbon:ButtonGroup>
                            <igRibbon:ButtonGroup HorizontalAlignment="Center" VerticalAlignment="Center">
                                <igRibbon:LabelTool Caption="Ascent:" Width="50" />
                                <igRibbon:TextEditorTool  x:Name="txtAscent" 
                                                            SmallImage="Images/Ribbon16/ascend.png"  
                                                            TextChanged="txtAscent_ValueChanged"    
                                                            HorizontalContentAlignment="Right"
                                                            Style="{StaticResource RateTextBox}" />
                            </igRibbon:ButtonGroup>
                            <igRibbon:SeparatorTool />
                            <igRibbon:ButtonGroup HorizontalAlignment="Center" VerticalAlignment="Center" Visibility="Collapsed">
                                <igRibbon:LabelTool Caption="Altitude:" Width="60" />
                                <igRibbon:TextEditorTool  x:Name="txtAltitude" 
                                                            TextChanged="txtAltitude_ValueChanged"
                                                            HorizontalContentAlignment="Right"
                                                            ToolTip="Altitude/ambient pressure in millibar"
                                                            Value="1000"
                                                            IsEnabled="False"
                                                            Style="{StaticResource AltitudeTextBox}" />
                            </igRibbon:ButtonGroup>
                            <igRibbon:ButtonGroup HorizontalAlignment="Center" VerticalAlignment="Center">
                                <igRibbon:LabelTool Caption="Max PPO2:" Width="60" />
                                <igRibbon:TextEditorTool  x:Name="txtMaxPPO2" 
                                                            TextChanged="txtMaxPPO2_ValueChanged"
                                                            HorizontalContentAlignment="Right"
                                                            Style="{StaticResource PPO2TextBox}" />
                            </igRibbon:ButtonGroup>
                            <igRibbon:ButtonGroup HorizontalAlignment="Center" VerticalAlignment="Center">
                                <igRibbon:LabelTool Caption="Default SP:" Width="60" />
                                <igRibbon:TextEditorTool  x:Name="txtSetpointDefault" 
                                                            TextChanged="txtSetpointDefault_TextChanged"
                                                            HorizontalContentAlignment="Right"
                                                          ToolTip="Default Setpoint must be a numeric value"
                                                            Style="{StaticResource PPO2TextBox}" />
                            </igRibbon:ButtonGroup>
                        </igRibbon:RibbonGroup>

                        <igRibbon:RibbonGroup Caption="Tables" Height="75">
                            <igRibbon:CheckBoxTool x:Name="chkShowBailout" Caption="Show OC Bailout" 
                                               Checked="chkShowBailout_Checked" Unchecked="chkShowBailout_Unchecked"  ToolTip="Whether to show the OC bailout profile for CCR profiles"/>
                            <igRibbon:CheckBoxTool x:Name="chkShowStopTime" Caption="Show Stop Time" 
                                               Checked="chkShowStopTime_Checked" Unchecked="chkShowStopTime_Unchecked"  ToolTip="Whether to show stop and runtime (i.e. 'MM:SS (RT)' or 'RT'" />

                        </igRibbon:RibbonGroup>
                    </igRibbon:RibbonTabItem>

                    <igRibbon:RibbonTabItem Header="Warnings">

                        <igRibbon:RibbonGroup Caption="PPO2" Height="75">
                            <igRibbon:ButtonGroup HorizontalAlignment="Center" VerticalAlignment="Center">
                                <igRibbon:LabelTool Caption="Dive:" Width="40" />
                                <igRibbon:TextEditorTool x:Name="txtWarnLowPPO2"  Id="txtWarnLowPPO2" 
                                                            SmallImage="Images/Ribbon16/warning_low.png"      
                                                            TextChanged="txtWarnLowPPO2_ValueChanged"
                                                            HorizontalContentAlignment="Right"
                                                            ToolTip="Low PPO2 warning for dive waypoints"
                                                            Style="{StaticResource WarningTextBox}" />
                                <igRibbon:TextEditorTool x:Name="txtWarnHighPPO2" Id="txtWarnHighPPO2"
                                                            SmallImage="Images/Ribbon16/warning_high.png" 
                                                            TextChanged="txtWarnHighPPO2_ValueChanged"
                                                            HorizontalContentAlignment="Right"
                                                            ToolTip="High PPO2 warning for dive waypoints"
                                                            Style="{StaticResource WarningTextBox}" />
                            </igRibbon:ButtonGroup>
                            <igRibbon:ButtonGroup HorizontalAlignment="Center" VerticalAlignment="Center">
                                <igRibbon:LabelTool Caption="Deco:" Width="40" />
                                <igRibbon:TextEditorTool  x:Name="txtWarnDecoLow" Id="txtWarnDecoLow" 
                                                            ToolTip="Low PPO2 warning for deco waypoints"
                                                            SmallImage="Images/Ribbon16/warning_low.png" 
                                                            TextChanged="txtWarnDecoLow_ValueChanged"
                                                            HorizontalContentAlignment="Right"
                                                            Style="{StaticResource WarningTextBox}" />
                                <igRibbon:TextEditorTool  x:Name="txtWarnDecoHigh" Id="txtWarnDecoHigh" 
                                                            ToolTip="High PPO2 warning for deco waypoints"
                                                            SmallImage="Images/Ribbon16/warning_high.png" 
                                                            TextChanged="txtWarnDecoHigh_ValueChanged"
                                                            HorizontalContentAlignment="Right"
                                                            Style="{StaticResource WarningTextBox}"  />
                            </igRibbon:ButtonGroup>
                            <igRibbon:SeparatorTool />
                        </igRibbon:RibbonGroup>

                        <igRibbon:RibbonGroup Caption="PPN2" Height="75">
                            <igRibbon:ButtonGroup HorizontalAlignment="Center" VerticalAlignment="Center">
                                <igRibbon:LabelTool Caption="Spike %:" Width="50" />
                                <igRibbon:TextEditorTool  x:Name="txtWarnPPN2" Id="txtWarnPPN2" 
                                                            ToolTip="High PPO2 warning for deco waypoints"
                                                            SmallImage="Images/Ribbon16/warning.png" 
                                                            TextChanged="txtWarnDecoHigh_ValueChanged"
                                                            HorizontalContentAlignment="Right"
                                                            Style="{StaticResource PPN2SpikeTextBox}"  />
                            </igRibbon:ButtonGroup>
                        </igRibbon:RibbonGroup>
                    </igRibbon:RibbonTabItem>

                    <igRibbon:RibbonTabItem Header="Help">
                        <igRibbon:RibbonGroup Caption="Information" Height="75">
                            <igRibbon:ButtonTool    Id="btnHelp" 
                                                Caption="Help"
                                                LargeImage="Images/Ribbon32/help.png"                            
                                                igRibbon:RibbonGroup.MinimumSize="ImageAndTextLarge"
                                                igRibbon:RibbonGroup.MaximumSize="ImageAndTextLarge"
                                                    Click="btnHelp_Click"/>
                            <igRibbon:ButtonTool    Id="btnAbout" 
                                                Caption="About"
                                                LargeImage="Images/Ribbon32/about.png"                            
                                                igRibbon:RibbonGroup.MinimumSize="ImageAndTextLarge"
                                                igRibbon:RibbonGroup.MaximumSize="ImageAndTextLarge"
                                                Click="btnAbout_Click"/>
                        </igRibbon:RibbonGroup>
                    </igRibbon:RibbonTabItem>
                </igRibbon:XamRibbon.Tabs>

                <igRibbon:XamRibbon.QuickAccessToolbar>
                    <igRibbon:QuickAccessToolbar>
                        <igRibbon:QatPlaceholderTool TargetId="btnNew" />
                        <igRibbon:QatPlaceholderTool TargetId="btnSave" />
                        <igRibbon:QatPlaceholderTool TargetId="btnOpen" />
                        <igRibbon:QatPlaceholderTool TargetId="btnCalc" />
                        <igRibbon:QatPlaceholderTool TargetId="btnReset" />
                    </igRibbon:QuickAccessToolbar>
                </igRibbon:XamRibbon.QuickAccessToolbar>
            </igRibbon:XamRibbon>
        </igRibbon:RibbonWindowContentHost.Ribbon>

       
        <igRibbon:RibbonWindowContentHost.StatusBar>

            <StatusBar Name="Status" Grid.Column="0" Grid.Row="5" VerticalAlignment="Bottom" Background="Gray">
                <StatusBarItem>
                    <ProgressBar x:Name="Progress" Background="Gray" Width="200" Height="15" Foreground="Blue" />
                </StatusBarItem>
            </StatusBar>
            
        </igRibbon:RibbonWindowContentHost.StatusBar>  

        
        <DockPanel Name="PanelContent" LastChildFill="True">
            <local:MainControl x:Name="Main" FileLoaded="Main_FileLoaded" 
                               CalculateFailed="Main_CalculateFailed"
                               Calculated="Main_Calculated" Visibility="Hidden" ValidationFailed="Main_ValidationFailed" />
        </DockPanel>
        
    </igRibbon:RibbonWindowContentHost>
</igRibbon:XamRibbonWindow>
